﻿#define _CRT_SECURE_NO_WARNINGS	
#include <iostream>
#include <string>
#include <ctime>
#include <windows.h> 
using namespace std;

/*
class Student {
private:
	string name;
	int id;
	int age;
public:
	explicit Student(string n, int i, int a)
		:name(n), id(i), age(a){}
	void print_info() {
		cout << "Name: " << name << ", ID: " << id << ", Age: " << age << endl;
	}
};
int main()
{
	Student s("Tom", 123456, 18);
	s.print_info();
	return 0;
}

class Book {
private:
	string title;
	double price;
public:
	Book() : title("Untitled"), price(0.0) {
		cout << "Default constructor called." << endl;
	}
	explicit Book(string t, double p) : title(t), price(p) {
		cout << "Parameterized constructor called." << endl;
	}
	Book(const Book& other) : title(other.title), price(other.price) {
		cout << "Book copied." << endl;
	}
	void print() {
		cout << "Title: " << title << ", Price: " << price << endl;
	}
};
int main()
{
	Book a;
	Book b("Hello", 23.5);
	Book c = b;
	a.print();
	b.print();
	c.print();

	return 0;
}
class Timer {
private:
	const int id;
	const time_t created_at;
public:
	Timer(int id) : id(id), created_at(time(0))
	{
		cout << "Timer created." << endl;
	}
	void print() const {
		cout << "Timer #" << id << ", Created at: " << ctime(&created_at);
	}
};
int main()
{
	Timer t1(1);
	Sleep(1000);
	Timer t2(2);
	t1.print();
	t2.print();
	return 0;
}
class Point2D {
private:
	int x, y;
public:
	Point2D(int x, int y) : x(x), y(y) {}

	friend ostream& operator<<(ostream& os, const Point2D& pt) {
		os << "Point(" <<
	}
};

template <typename T1, typename T2>
class Pair;

template <typename T1, typename T2>
ostream& operator<<(ostream& os, const Pair<T1, T2>& p);

template <typename T1, typename T2>
class Pair {
private:
	T1 first;
	T2 second;

public:
	Pair(T1 a, T2 b) : first(a), second(b) {}

	T1 get_first() const { return first; }
	T2 get_second() const { return second; }

	bool operator==(const Pair<T1, T2>& other) const {
		return first == other.first && second == other.second;
	}

	friend ostream& operator<< <>(ostream& os, const Pair<T1, T2>& p);
};

template <typename T1, typename T2>
ostream& operator<<(ostream& os, const Pair<T1, T2>& p) {
	os << "(" << p.first << ", " << p.second << ")";
	return os;
}

int main() {
	Pair<int, string> p1(1, "apple");
	Pair<double, char> p2(3.14, 'Z');

	cout << "p1: " << p1 << endl;
	cout << "p2: " << p2 << endl;
}
*/
